<?php
/**
 * Created by IntelliJ IDEA.
 * User: Fernando
 * Date: 19/11/2014
 * Time: 23:17
 */

use Symfony\Component\HttpKernel\Controller\ControllerReference;
use \DateTime;
use \DateInterval;

echo $view['actions']->render(new ControllerReference('FiestissimaCRM:Index:header'));

$date = new DateTime(date('Y-m-d'));
$interval = new DateInterval('P1M');

$date->sub($interval);

$month = $date->format('F');

?>
    <div id="page-wrapper">
        <div class="row">
            <div class="col-lg-12">
                <h2 class="page-header">Reportes</h2>
            </div>
        </div>
        <div class="row">
            <div class="row">
                <div class="col-lg-6">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h3 class="panel-title">Total ventas <?php echo $month; ?></h3>
                        </div>
                        <div class="panel-body">
                            <div id="total_ventas" style="height: 250px;"></div>
                        </div>
                    </div>
                </div>
                <div class="col-lg-6">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h3 class="panel-title">Total por tipo producto <?php echo $month; ?></h3>
                        </div>
                        <div class="panel-body">
                            <div id="total_tipos" style="height: 250px;"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script src="<?php echo $view['assets']->getUrl('js/fiestissima_reportes_ajax.js') ?>"></script>
<?php echo $view->render('FiestissimaCRM:Default:footer.html.php'); ?>